package com.crm.crm.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.crm.crm.domain.Dept;
import com.crm.crm.domain.InsertRecord;
import com.crm.crm.domain.vo.IndexTodayDataVo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

public interface IndexMapper extends BaseMapper<InsertRecord>{
    <T> Integer countByWrapper(@Param("ew") LambdaQueryWrapper<T> wrapper, @Param("tableName") String tableName);
//    线索数量
    Integer countClues(String beginCreateTime, String endCreateTime);
//    商机数量
    Integer countBusiness(String beginCreateTime, String endCreateTime);
//    客户数量
    Integer countCustomer(String beginCreateTime, String endCreateTime);
//销售金额
    BigDecimal countSalesAmount(String beginCreateTime, String endCreateTime);
//    今日新增商机
    Integer countTodayBusiness(String beginCreateTime, String endCreateTime);
//    今日新增客户
    Integer countTodayClues(String beginCreateTime, String endCreateTime);
//    今日销售额
    BigDecimal countTodaySalesAmount(String beginCreateTime, String endCreateTime);
}
